/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package haw.pr2.A2a.implementations;

import haw.pr2.A2a.interfaces.Force;

/**
 *
 * @author Fabian Heidorn, Alexander Kaack
 */
public class ForceInN extends AbstractScalar<Force> implements Force{
    private final double forceInN;

    public ForceInN(double forceInN) {
        this.forceInN=forceInN;
    }

    @Override
    public Force inverse() {
        return new ForceInN(-this.n());
    }

    @Override
    public Force add(Force value) {
        return new ForceInN(this.n()+value.n());
    }

    @Override
    public Force sub(Force value) {
        return new ForceInN(this.n()-value.n());
    }

    @Override
    public Force mul(Force value) {
        return new ForceInN(this.n()*value.n());
    }

    @Override
    public Force div(double value) {
        return new ForceInN(this.n()/value);
    }

    @Override
    public double div(Force value) {
        return this.n()/value.n();
    }

    @Override
    public boolean isZero() {
        return this.n()==ZERO_FORCE.n();
    }

    @Override
    public boolean isValid() {
        return true;
    }
    
    @Override
    public double n() {
        return this.forceInN;
    }
    
}
